package com.auctionhaus

import grails.test.*
import java.util.Formatter.DateTime

class BidTests extends GrailsUnitTestCase {
    protected void setUp() {
        super.setUp()
    }

    protected void tearDown() {
        super.tearDown()
    }

    void testSomething() {

    }

    // B-3 Bids are required to have a bidder(Customer)
    void testBidHasBuyer()
    {
        mockDomain(Bid)
        def bid = new Bid(amount: 0, date: new DateTime(), buyer:'')

        assertFalse bid.validate()
        assertEquals 'Missing buyer', 'nullable', bid.errors['buyer']
    }
}